<template>
<div>
  <h2>我是didi开{{car}}</h2>
</div>
</template>


<script>
import PubSub from "pubsub-js";
export default {
name:"Didi",
  data(){
    return{
      car:"五菱风光",
    }
  },
  mounted() {
    PubSub.subscribe("getCar", this.getCar)
  },
  methods:{
    getCar(_,value){
      this.car = value
    }
  }
}
</script>


<style></style>